package com.lazy.core.service.impl;

import com.lazy.core.service.UserService;
import com.lazy.utils.interceptor.User;
import com.lazy.utils.token.client.ClientTokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    ClientTokenUtil clientTokenUtil;

    @Override
    public User getUserByToken(String token) throws Exception {
        User user = clientTokenUtil.getInfoFromToken(token);
        return user;
    }
}
